<template>
    <view class="container paddingBottomBar" :style="themeColor">
        <view class="main">
            <view v-if="loadOk" :style="{ height: listHeight }">
                <coupon-list :height="listHeight"></coupon-list>
            </view>
        </view>
    </view>
</template>

<script>
import couponList from "@/pages_scan/components/coupon/coupon-list.vue"
import { getElementHeight } from "@/uni-sub-base/utils/elementUtil.js"

export default {
    components: {
        couponList,
    },
    data() {
        return {
            listHeight: 0,
            loadOk: false,
        }
    },
    mounted() {
        this.getListHeight()
    },
    methods: {
        getListHeight() {
            //获取商品高度
            getElementHeight(this, ".main", (e) => {
                this.listHeight = e - uni.upx2px(130) + "px"
                this.loadOk = true
            })
        },
    },
}
</script>

<style lang="scss">
.btn {
    margin-left: 0;
    border-radius: 100rpx;
    height: 90rpx;
}
</style>
